Socket
Socket
Sign inDemoInstall

is-type-of

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-type-of

complete type checking for node


Version published
Weekly downloads
420K
decreased by-6.87%
Maintainers
2
Weekly downloads
 
Created
Source

is-type-of

complete type checking for node, extend core-util-is

dependencies:

Install

npm install is-type-of

Example

var is = require('is-type-of');

is.array([1]); // => true
is.primitive(true); // => true
is.primitive({}); // => false
is.generatorFunction(function * () {}); // => true
is.long(Math.pow(2, 33)); // => true
is.double(0); // => false

API

From core-util-is

is.array(arr)
is.boolean(bool)
is.null(null)
is.nullOrUndefined(null)
is.number(num)
is.string(str)
is.symbol(sym)
is.undefined(undef)
is.regExp(reg)
is.object(obj)
is.date(date)
is.error(err)
is.function(fn)
is.primitive(prim)
is.buffer(buf)

from is-stream

is.stream(stream)
is.readableStream(readable)
is.writableStream(writable)
is.duplexStream(duplex)

from is-class

is.class(obj)

Extend API

is.finite(num)
is.NaN(NaN)
is.generator(gen)
is.generatorFunction(fn)
is.promise(fn)
is.int(int)
is.double(double)
is.int32(int)
is.long(long)
is.Long(Long)
  • Support Long instance.

License

MIT

Keywords

FAQs

Package last updated on 04 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc